<?php
/**
 * Created by PhpStorm.
 * User: yellow
 * Date: 2019/7/24
 * Time: 14:23
 */

namespace app\common\model;


use think\Model;

class Delivery extends Model
{

    public function order(){
        return $this->hasOne('Order', 'id', 'order_id')->bind([
            'order_no',
            'skd_time',
            'use_day',
            'remark'
        ]);
    }

    /**
     * 投递状态
     * @param $value
     * @return mixed
     */
    public function getStatusAttr($value){
        $statuArr = ['投递中','待确认','投递成功','投递失败'];
        return $statuArr[$value];
    }

}